package com.lagou.sale.pojo;

public class CreateOrderResult {
    private boolean isSuccess;
    private long orderId;

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public static CreateOrderResult createSuccessResult(long orderId) {
        CreateOrderResult createOrderResult = new CreateOrderResult();
        createOrderResult.setSuccess(true);
        createOrderResult.setOrderId(orderId);
        return createOrderResult;
    }

    public static CreateOrderResult createFailResult() {
        CreateOrderResult createOrderResult = new CreateOrderResult();
        createOrderResult.setSuccess(false);
        return createOrderResult;
    }

}
